<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-type" class="form-control" name="row[type]" type="text">
        </div>
    </div>
    <!--    <div class="form-group">-->
    <!--        <label class="control-label col-xs-12 col-sm-2">{:__('K_time')}:</label>-->
    <!--        <div class="col-xs-12 col-sm-8">-->
    <!--            <input id="c-k_time" class="form-control datetimepicker" data-date-format="HH:mm:ss" data-use-current="true" name="row[k_time]" type="text" value="{:date('Y-m-d H:i:s')}">-->
    <!--        </div>-->
    <!--    </div>-->
    <!--    <div class="form-group">-->
    <!--        <label class="control-label col-xs-12 col-sm-2">{:__('J_time')}:</label>-->
    <!--        <div class="col-xs-12 col-sm-8">-->
    <!--            <input id="c-j_time" class="form-control datetimepicker" data-date-format="HH:mm:ss" data-use-current="true" name="row[j_time]" type="text" value="{:date('Y-m-d H:i:s')}">-->
    <!--        </div>-->
    <!--    </div>-->
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('预定时间')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-yuding" class="form-control" name="row[yuding]" type="text">-->
<!--        </div>-->
<!--    </div>-->

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('房间锁ID')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-yuding" class="form-control" name="row[room_lock_id]" type="text">
        </div>
    </div>
     <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('电闸ID')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-yuding" class="form-control" name="row[dian_id]" type="text">
        </div>
    </div>
    <!--<div class="form-group">-->
    <!--    <label class="control-label col-xs-12 col-sm-2">{:__('分闸命令')}:</label>-->
    <!--    <div class="col-xs-12 col-sm-8">-->
    <!--        <input id="c-yuding" class="form-control" name="row[opening_command]" type="text">-->
    <!--    </div>-->
    <!--</div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('喇叭设备ID')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-yuding" class="form-control" name="row[message_devid]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-price" class="form-control" step="0.01" name="row[price]" type="number">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Category_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-category_id" data-rule="required" data-source="category/index"
                   data-params='{"custom[type]":"page"}' class="form-control selectpage" name="row[category_id]"
                   type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" class="form-control" name="row[name]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label for="c-type" class="control-label col-xs-12 col-sm-2">{:__('时间间隔')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-type" data-rule="required" class="form-control " name="row[duration]">
                <option value="1">30分钟</option>
                <option value="0">15分钟</option>
            </select>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('起订小时')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-booking_time" class="form-control" name="row[booking_time]" type="number">
        </div>
    </div>
	
	 <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('打扫时间（分钟）')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-clean_time" class="form-control" name="row[clean_time]" type="number">
        </div>
    </div>
	
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-image" class="form-control" size="50" name="row[image]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-image" class="btn btn-danger faupload"
                                  data-input-id="c-image"
                                  data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp"
                                  data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose"
                                  data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i
                            class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-image"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-image"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('环境图片')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-images" class="form-control" size="50" name="row[images]" type="text" value="">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-images" class="btn btn-danger faupload"
                                  data-input-id="c-images"
                                  data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp"
                                  data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-images" class="btn btn-primary fachoose"
                                  data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i
                            class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-images"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-images"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Biaoqian')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-biaoqian" class="form-control" name="row[biaoqian]" placeholder="多个标签请用逗号 , 分割" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('套餐支持会员价')}:</label>
        <div class="col-xs-12 col-sm-8">

        <input id="c-package_vip_price" name="row[package_vip_price]" type="hidden" value="{:$row.package_vip_price?1:0}">
        <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-package_vip_price" data-yes="1" data-no="0">
            <i class="fa fa-toggle-on text-success {if !$row.package_vip_price}fa-flip-horizontal text-gray{/if} fa-2x"></i>
        </a>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('套餐')}:</label>
        <div class="col-xs-12 col-sm-8">
            <dl class="fieldlist" data-name="package" data-template="testtpl">
                <dd>
                    <ins style="display:none;">ID</ins>
                    <ins>时长</ins>
                    <ins>金额</ins>
                </dd>
                <dd>
                    <a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> 追加</a>
                </dd>
                <textarea name="row[test]" class="form-control hide" cols="30" rows="5"></textarea>
            </dl>
        </div>
    </div>
    <!--定义模板，模板语法使用Art-Template模板语法-->
    <script type="text/html" id="testtpl">
        <dd class="form-inline">
            <input type="hidden" name="row[<%=name%>][<%=index%>][id]" class="form-control" value="<%=row['id']%>" size="10">
            <input type="text" name="row[<%=name%>][<%=index%>][times]" class="form-control" value="<%=row['times']%>" size="10">
            <input type="text" name="row[<%=name%>][<%=index%>][price]" class="form-control" value="<%=row['price']%>" size="10">
            <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span> <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
        </dd>
    </script>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
